package com.myblog.mapper;

import com.myblog.model.Reward;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.security.core.parameters.P;

import java.util.List;

@Mapper
public interface RewardMapper {
    @Select("select * from reward order by id desc;")
    List<Reward> selectAllReward();

    @Delete("delete from reward where id = #{id}")
    void deleteRewardById(@Param(value = "id") Integer id);

    void insertReward(Reward reward);
}
